﻿using System.Runtime.Serialization;
using System.Text.Json;

namespace ConfigWebApi.Common;

[DataContract]
public class LogLevel
{
    [DataMember(Name = "Default")]
    public string Default { get; set; }

    [DataMember(Name = "Microsoft")]
    public string Microsoft { get; set; }

    [DataMember(Name = "Microsoft.Hosting.Lifetime")]
    public string? MicrosoftHostingLifetime { get; set; }
}

[DataContract]
public class Logging
{
    [DataMember]
    public LogLevel LogLevel { get; set; }
}


[DataContract]
public class Jwt
{
    [DataMember]
    public string? Audience { get; set; }
    [DataMember]
    public string? Issuer { get; set; }
    [DataMember]
    public string? SecretKey { get; set; }
    [DataMember]
    public int Expire { get; set; }

    public override string ToString()
    {
        return JsonSerializer.Serialize(this);
    }
}